VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "mscomctl.OCX"
Begin VB.Form frmPersoSeriados 
   Caption         =   "Form1"
   ClientHeight    =   9810
   ClientLeft      =   225
   ClientTop       =   555
   ClientWidth     =   15120
   LinkTopic       =   "Form1"
   ScaleHeight     =   9810
   ScaleWidth      =   15120
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "frmPersoSeriados.frx":0000
      Left            =   1440
      List            =   "frmPersoSeriados.frx":0061
      TabIndex        =   4
      Top             =   720
      Width           =   2775
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   4440
      TabIndex        =   3
      Top             =   720
      Width           =   8295
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Agregar"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   4800
      TabIndex        =   2
      Top             =   8160
      Width           =   1695
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Salir"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   6840
      TabIndex        =   1
      Top             =   8160
      Width           =   1695
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Limpiar"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   1440
      TabIndex        =   0
      Top             =   8160
      Visible         =   0   'False
      Width           =   1695
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   6975
      Left            =   1440
      TabIndex        =   6
      Top             =   1080
      Width           =   11295
      _ExtentX        =   19923
      _ExtentY        =   12303
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      TextBackground  =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   16777215
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   2
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "Opcion"
         Object.Width           =   5292
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "Valor"
         Object.Width           =   17639
      EndProperty
   End
   Begin VB.Label SkinLabel1 
      Height          =   375
      Left            =   1440
      TabIndex        =   5
      Top             =   240
      Width           =   5055
   End
End
Attribute VB_Name = "frmPersoSeriados"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub Mostrar_detalle()
    Dim t As DAO.Recordset
    Dim subelemento As ListItem
    Set t = Base.OpenRecordset("select *from  seriadoOP order by opcion")
    
    ListView1.ListItems.Clear
    While Not t.EOF
        Set subelemento = ListView1.ListItems.Add(, , t(0))
        subelemento.SubItems(1) = t(1)
        t.MoveNext
    Wend
    
    
End Sub

Private Sub Command1_Click()
    Base.Execute "insert into seriadoOP values ('" & Combo1.Text & "','" & Text1.Text & "')"
    Mostrar_detalle
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
    If MsgBox("Esta seguro de que desea eliminar TODOS LA PERSONALIZACION", vbYesNo) = vbYes Then
        Seguridad.respaldarDataVALOR
        Base.Execute "delete from seriadoOP"
        Mostrar_detalle
    End If
End Sub

Private Sub Form_Load()
    Me.Caption = titulo("Personalizar seriado")
    Combo1.Clear
    Combo1.AddItem "Tipo de muestra"
    Combo1.AddItem "Medico"
    Combo1.AddItem "Actividad Estrogenica"
    Combo1.AddItem "Predominio de celulas"
    Combo1.AddItem "Tipo Exudado"
    Combo1.AddItem "Tipo Flora"
    Combo1.AddItem "Control Interno"
    Combo1.AddItem "Diagnostico"
    Combo1.AddItem "Identificacion"
    
    Mostrar_detalle
End Sub

Private Sub ListView1_DblClick()
    frmCambiar.Text1.Text = ListView1.SelectedItem
    frmCambiar.Text2.Text = ListView1.SelectedItem.ListSubItems(1)
    frmCambiar.Show vbModal
    If frmCambiar.OP <> "-1" Then
        Base.Execute "update seriadoOP set opcion='" & frmCambiar.OP & "' , valor='" & frmCambiar.valor & "' where  opcion='" & ListView1.SelectedItem & "' and valor='" & ListView1.SelectedItem.ListSubItems(1) & "'"
        Mostrar_detalle
    End If
End Sub

Private Sub ListView1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 46 Then
        Base.Execute "delete from seriadoOP where  opcion='" & ListView1.SelectedItem & "' and valor='" & ListView1.SelectedItem.ListSubItems(1) & "'"
        Mostrar_detalle
    End If
End Sub


